import request from '@/config/request';

// 我负责的医生列表
export function expertList (data: any): Promise<any> {
  return request({
    url: '/business/expert/list',
    method: 'GET',
    data
  })
}

// 注册医生
export function addExpert (data: any): Promise<any> {
  return request({
    url: '/business/expert/add',
    method: 'POST',
    data
  })
}

// 资质审核进度列表
export function apExpert (data: any): Promise<any> {
  return request({
    url: '/business/expert/ap/list',
    method: 'GET',
    data
  })
}

// 资质审核进度详情
export function apExpertDetails (id: number): Promise<any> {
  return request({
    url: `/business/expert/ap/${id}`,
    method: 'GET'
  })
}

// 医生详情
export function expertInfo (id: number): Promise<any> {
  return request({
    url: `/expert/expert/${id}`,
    method: 'GET'
  })
}

// 修改专家
export function updateExpert(data: any) {
  return request({
    url: '/expert/expert',
    method: 'PUT',
    data
  })
}

// 医生详情数据-包含统计数据
export function expertDetails (id: number): Promise<any> {
  return request({
    url: `/business/expert/${id}`,
    method: 'GET'
  })
}

// 开单统计
export function statisticalData<T>(): Promise<{data: T}> {
  return request({
    url: `/business/expert/getStatisticalData`,
    method: 'GET'
  })
}

// 开单医生统计列表
export function getStatsExpertList(data: any): Promise<any> {
  return request({
    url: `/business/expert/stats/list`,
    method: 'GET',
    data
  })
}